﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TNServer
{
    public class GlobalDB
    {
        public  string newkey = "NewKey";
        public  string oldKey = "OldKey";

        public Dictionary<string,GlobalVO> DataDic = new Dictionary<string, GlobalVO>();

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public GlobalVO GetCurGlobalVO()
        {
            return DataDic[newkey];
        }

        public void AddNewGlobalVO(GlobalVO globalVo)
        {
            GlobalVO temp = null;
            if (DataDic.ContainsKey(newkey))
            {
                temp = DataDic[newkey];
            }
            DataDic[newkey] = globalVo;
            DataDic[oldKey] = temp;

        }
        





    }
}
